#coding=utf-8
import django
from django import http
from django import shortcuts

def respond(request, template, params=None):
    if params is None:
        params = {}

    if not template.endswith('.html'):
        template += '.html'
    template = 'blogapp/webfront/' + template
    return shortcuts.render_to_response(template, params)

def index(request):
    return respond(request, 'index', {'msg': 'hellow world'})

def article(request):
    return respond(request, 'article', {'msg': 'hellow world'})

def sitemap(request):
    return respond(request, 'sitemap', {'msg': 'hellow world'})